package com.daiyang.lottery.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ActivityStatusEnum {
    RUNNING(1,"活动进行中"),
    COMPLETED(2,"活动已完成");
    /**
     * code
     */
    private final Integer code;

    /**
     * 描述
     */
    private final String message;

    public static ActivityStatusEnum formName(String name) {
        for (ActivityStatusEnum activityStatusEnum :
                ActivityStatusEnum.values()) {
            if (activityStatusEnum.name().equalsIgnoreCase(name)) {
                return activityStatusEnum;
            }
        }
        return null;
    }
}
